// import request from '@/utils/request1'

// export const login = ({adminname,password})=>{
//   return request({
//     url:'admin/login',
//     method:'POST',
//     data:{
//       adminname,
//       password
//     }
//   })
// }

import request from '@/utils/request'
// 创建/编辑设备组
export function group_save(data) {
    return request({
        url: 'group/save',
        method: 'post',
        data
    })
}
//获取设备组列表
export function group_list(query) {
    return request({
        url: 'group/list',
        method: 'get',
        params: query
    })
}
//删除设备组
export function group_delete(data) {
    return request({
        url: 'group/delete',
        method: 'post',
        data
    })
}
// 创建/编辑设备
export function device_save(data) {
    return request({
        url: 'device/save',
        method: 'post',
        data
    })
}
//视频播放
export function device_play(data) {
    return request({
        url: 'device/play',
        method: 'post',
        data
    })
}
//获取设备列表
export function device_list(query) {
    return request({
        url: 'device/list',
        method: 'get',
        params: query
    })
}
//获取设备详情
export function device_info(query) {
    return request({
        url: 'device/info',
        method: 'get',
        params: query
    })
}
//删除设备
export function device_delete(data) {
    return request({
        url: 'device/delete',
        method: 'post',
        data
    })
}
//创建/编辑巡检区域
export function area_save(data) {
    return request({
        url: 'area/save',
        method: 'post',
        data
    })
}
//创建/编辑巡检区域
export function file_upload(data) {
    return request({
        url: 'file/upload',
        method: 'post',
        data
    })
}
//巡检区域列表
export function area_list(query) {
    return request({
        url: 'area/list',
        method: 'get',
        params: query
    })
}
//巡检区域详情
export function area_info(query) {
    return request({
        url: 'area/info',
        method: 'get',
        params: query
    })
}
//创建/编辑巡检区域
export function area_delete(data) {
    return request({
        url: 'area/delete',
        method: 'post',
        data
    })
}
//创建/编辑巡检区域
export function storage_save(data) {
    return request({
        url: 'storage/save',
        method: 'post',
        data
    })
}
//储罐列表
export function storage_list(query) {
    return request({
        url: 'storage/list',
        method: 'get',
        params: query
    })
}
//储罐详情
export function storage_info(query) {
    return request({
        url: 'storage/info',
        method: 'get',
        params: query
    })
}
//储罐删除
export function storage_delete(data) {
    return request({
        url: 'storage/delete',
        method: 'post',
        data
    })
}
//创建/编辑舱口
export function hatch_save(data) {
    return request({
        url: 'hatch/save',
        method: 'post',
        data
    })
}
//舱口列表
export function hatch_list(query) {
    return request({
        url: 'hatch/list',
        method: 'get',
        params: query
    })
}
//删除舱口
export function hatch_delete(data) {
    return request({
        url: 'hatch/delete',
        method: 'post',
        data
    })
}

//回放列表
export function playback_list(query) {
    return request({
        url: 'playback/list',
        method: 'get',
        params: query
    })
}
//获取设备配置（热传感器）
export function config_list(query) {
    return request({
        url: 'device-config/list',
        method: 'get',
        params: query
    })
}
//创建/编辑设备配置
export function config_save(data) {
    return request({
        url: 'device-config/save',
        method: 'post',
        data
    })
}
